package com.arpa.ntocc.common.domain.entity;

import com.arpa.ntocc.common.domain.enums.SystemEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 资源
 * </p>
 *
 * @author LEO
 * @since 2019-08-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_resource")
public class Resource extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "资源标识")
    @TableField(value = "code")
    private String code;

    @ApiModelProperty(value = "上级资源code")
    @TableField("parent_code")
    private String parentCode;

    @ApiModelProperty(value = "资源层级")
    @TableField("level")
    private Integer level;

    @ApiModelProperty(value = "资源名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "菜单名")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "跳转")
    @TableField("redirect")
    private String redirect;

    @ApiModelProperty(value = "资源权限")
    @TableField("permission")
    private String permission;

    @ApiModelProperty(value = "跳转链接")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "vue组件路径")
    @TableField("component")
    private String component;

    @ApiModelProperty(value = "排序")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty(value = "图标")
    @TableField("icon")
    private String icon;

    @ApiModelProperty(value = "所属系统")
    @TableField("belong")
    private SystemEnum belong;

    @ApiModelProperty(value = "机构code")
    @TableField("branch_code")
    private String branchCode;

    @ApiModelProperty(value = "是否隐藏路由")
    @TableField("hidden")
    private boolean hidden;

    @ApiModelProperty(value = "是否使用缓存，使用缓存则页面切换回来原来操作的数据还在，默认为true，表示不使用缓存；")
    @TableField("no_cache")
    private boolean noCache;



}
